package UnitTest;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;

import Cani.InLatime;
import Cani.Nod;
import Joc.Joc;

public class InLatimeCani {

	@Test
	public void testForMethodAdaugarePrimNod() {
		
		Joc j = Joc.getJocinstance();
		ArrayList<String> initialvalue=new ArrayList<String>();
		initialvalue.add("3");
		initialvalue.add("4");
		j.setInitialvalue(initialvalue);
		
		InLatime latimeCani = new InLatime();
		Nod n = new Nod(5, 0);

		latimeCani.adaugare_prim_nod(n);
		//check if the stack have 5.0
		assertEquals(1,latimeCani.getNod_solutie().size());
		assertEquals(5,latimeCani.getNod_solutie().get(0).getX());
		assertEquals(0,latimeCani.getNod_solutie().get(0).getY());
	}

}
